<?php
$v['filter_rows'] = ConfigParser::get('product/' . $uri_data['category_name'] , 'rows');
$v['attribute_value'] = FdHelper::getFromApi($uri_data['written_language_tag'] . '/' . 'category/' . $uri_data['category_name'] . '/attributes/');
$v['unlimited'] = ConfigParser::get('wlp' , 'wlp[\'' . $uri_data['written_language_tag'] .'\'][\'unlimited\']');
$v['attribute_name_wlp'] = ConfigParser::get('product/' . $uri_data['category_name'] , 'attribute_name_wlp[\'' . $uri_data['written_language_tag'] .'\']');
$v['category_name_wlp'] = ConfigParser::get('product/' . $uri_data['category_name'] , 'name[\'' . $uri_data['written_language_tag'] .'\']');

$uri_position = ConfigParser::get('product/' . $uri_data['category_name'] , 'uri_position');
$v['uri_where_array'] = explode('-',$uri_data['where']);
$v['uri_where'] = array(
);
$v['title'] = $v['category_name_wlp'] . ' ';
foreach($uri_position as $position=>$attribute_name)
{
	$v['uri_where'][$attribute_name] = isset($v['uri_where_array'][$position-1]) ? $v['uri_where_array'][$position-1] : 0;
	if(isset($v['uri_where_array'][$position-1])&&($v['uri_where_array'][$position-1]!=0))
	{
		if(isset($v['attribute_value'][$attribute_name][$v['uri_where_array'][$position-1]]))
		{
			$v['title'] .= $v['attribute_value'][$attribute_name][$v['uri_where_array'][$position-1]] . ' ';
		}
		else
		{
			$v['title'] .= $v['attribute_name_wlp'][$attribute_name] . ' ';
		}
	}
}

$v['uri_where']['order_by'] = isset($v['uri_where_array'][$position]) ? $v['uri_where_array'][$position] : 0;
$v['uri_where']['page_num'] = isset($v['uri_where_array'][$position+1]) ? $v['uri_where_array'][$position+1] : 0;

//$output[] = 'filter';
?>
